﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dwarfs.Object;

namespace Dwarfs.Manager
{
    class SaveStateManager
    {
        public static Stack<SaveState> lastSaveState = new Stack<SaveState>();

        public static void pushSaveState(SaveState savestate)
        {
            lastSaveState.Push(savestate);
        }
        public static bool loadLastState()
        {
            if (lastSaveState.Count > 0)
            {
                SaveState tempSaveState = lastSaveState.Peek();
                tempSaveState.load();
                return true;
            }
            else 
                return false;
        }
    }
}
